// #include <stdlib.h>
// #include <sys/types.h>
// #include <sys/stat.h>
// #include <fcntl.h>
// #include <unistd.h>
#include <pthread.h>
#include <stdio.h>


void *ThreadFunc(void *pv);
int main(int argc,char*argv[])
{
    pthread_t tid;
    int ret = 0;
    int i = 0;

    ret = pthread_create(&tid,NULL,ThreadFunc,(void*)123);
    if(ret != 0)
    {
        printf("error");
        return 1;
    }
    for(i=0;i<30;i++)
    {
        printf("I an in main thread %d...\n",i);
    }
    while (1)
    {
        
    }
    


    return 0;
}

void *ThreadFunc(void *pv)
{
    int i=0;
    long x = (long)pv;
    for (i=0;i<30;i++)
    {
        printf("I an in new thread %d x=%ld...\n",i,x);

    }
    return (void*)0;
}